sed comand - remove virus from wordpress [duplicate]
Posted
by
EliaszKubala
on Server Fault
See other posts from Server Fault
or by EliaszKubala
Published on 2014-08-18T05:52:16Z
Indexed on
2014/08/18
16:30 UTC
Read the original article
Hit count: 271
This question already has an answer here:
- How do I deal with a compromised server? 12 answers
I have malicious code in every php file. This malicius code is auto paste at the beginning of file. I want to remove this with UNIX command from console.
This is malicious code:
<?php $guobywgpku = '..... u=$bhpegpvvmc-1; ?>
I write this RegExp,
"/<\?php \$guobywgpku.*\?>/m"
and this RegExp work. I tested it here.
The problem is, write command which remove this malicious code from every php file on the sever. Please Help me.
Now i have something like this.
sed "/<\?php \$guobywgpku.*\?>/m" index.php
© Server Fault or respective owner